<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.prime.com.tr/ui">

<h:head>
<title>Painel</title>
</h:head>
	<h:body>
	
	<h:form>
	
		<p:panel id="painel"
				 header="Painel" 
				 widgetVar="panel" 
				 toggleable="true" 
				 closable="true"
				 toggleSpeed="500"
				 closeSpeed="500">
	
	<!-- Menu de opções -->	
		<f:facet name="options">
			<p:menu>
				<p:submenu label="Opções">
				
				</p:submenu>
			</p:menu>
		
		</f:facet>
		
	<!-- Corpo do painel -->
	
		
   <p:wizard backLabel="Anterior"
   			 nextLabel="Proximo">
     
        <p:tab id="personal" title="Pessoal" >  
  
            <p:panel header="Dados Pessoais">  
             
                <h:messages errorClass="error"/>  
                
                <h:panelGrid columns="1" columnClasses="label, value" styleClass="grid">  
                    <h:outputText value="Nome Completo: *" />  
                    <p:inputText required="true" label="nomecompleto"  
                            value="#{funcionarioAction.funcionario.nomePessoa}" 
                            size="40"/>  
                     
                    <h:outputText value="Cpf: *" />  
                    <p:inputMask mask="999.999.999-99" 
                    			value="#{funcionarioAction.funcionario.cpf}"
                    			size="11"/>  
                      
                    <h:outputText value="Data de Nascimento: " />  
                   <p:calendar value="#{funcionarioAction.funcionario.dataNascimento}"
   						 mode="popup" 
   						 navigator="true"
   						 size="08"
   						 pattern="dd.MM.yyyy">
   						</p:calendar>
                      
                    
                </h:panelGrid>  
            </p:panel>  
        
        </p:tab>  
           
        <p:tab id="address" title="Endereço" >  
            <p:panel header="Dados do Endereço">  
              
                <h:messages errorClass="error"/>  
                  
                <h:panelGrid columns="1" columnClasses="label, value" styleClass="grid">  
                    <h:outputText value="Logradouro: " />  
                    <p:inputText value="#{funcionarioAction.funcionario.endereco.nomeRua}" 
                    				size="35"/>  
                    
                    <h:outputText value="Complemento: " />  
                    <p:inputText value="#{funcionarioAction.funcionario.endereco.pontoReferencia}" 
                    			size="50"/>   
                    
                    <h:outputText value="Bairro: " />  
                    <p:inputText value="#{funcionarioAction.funcionario.endereco.bairro}" 
                    				size="12"/>  
                      
                    <h:outputText value="Cidade: " />  
                    <p:inputText value="#{funcionarioAction.funcionario.endereco.cidade}" 
                    				size="15"/>  
                      
                    <h:outputText value="UF: " />  
                    <p:inputText value="#{funcionarioAction.funcionario.endereco.uf}" 
                    				size="3"/>  
                </h:panelGrid>  
            </p:panel>  
        </p:tab>  
              
        <p:tab id="contact" title="Contato" >  
            <p:panel header="Dados de Contato">  
               
                <h:messages errorClass="error"/>  
         
                <h:panelGrid columns="1" columnClasses="label, value">  
                    <h:outputText value="Email: *" />  
                    <p:inputText required="true" label="Email"  
                            value="#{funcionarioAction.funcionario.email}" 
                            size="30"/>  
                      
                    <h:outputLabel value="Telefone Residencial:" />
   						<p:inputMask mask="(99)9999-9999" 
   						value="#{funcionarioAction.funcionario.telefoneResidencial}"
   						size="10"/> 
                      
                   <h:outputLabel value="Telefone Celular:" />
   						<p:inputMask mask="(99)9999-9999" 
   						value="#{funcionarioAction.funcionario.telefoneCelular}"
   						size="10"/>
                </h:panelGrid>  
            </p:panel>  
        </p:tab>  
              
        <p:tab id="confirm" title="Confirmar" >  
            <p:panel header="Confirmação">  
              
                <p:growl id="growl" sticky="true" showDetail="true"/>  
              
                <h:panelGrid id="confirmation" columns="6" >  
                    <h:outputText value="Nome Completo:" />  
                    <h:outputText styleClass="outputLabel"  
                                value="#{funcionarioAction.funcionario.nomePessoa}" 
                                />  
                      
                    <h:outputText value="Cpf: " />  
                    <h:outputText  styleClass="outputLabel"  
                                 value="#{funcionarioAction.funcionario.cpf}"/>  
                      
                    <h:outputText value="Data de Nascimento: " />  
                    <h:outputText styleClass="outputLabel"  
                                value="#{funcionarioAction.funcionario.dataNascimento}" /> 
                      
                    <h:outputText value="Logradouro: " />  
                    <h:outputText styleClass="outputLabel"  
                                value="#{funcionarioAction.funcionario.endereco.nomeRua}" />  
                      
                   
                      
                    <h:outputText value="Email: " />  
                    <h:outputText styleClass="outputLabel"  
                                value="#{funcionarioAction.funcionario.email}" />  
                      
                    <h:outputText value="Telefone Residencial: " />  
                    <h:outputText styleClass="outputLabel"  
                                value="#{funcionarioAction.funcionario.telefoneResidencial}"/>  
                      
                    <h:outputText value="Telefone Celular: " />  
                    <h:outputText styleClass="outputLabel"  
                                value="#{funcionarioAction.funcionario.telefoneCelular}" />  
                      
                    <h:outputText />  
                    <h:outputText />  
                </h:panelGrid>  
                  
                <p:commandButton id="salvar" value="Salvar" update="growl"    
                            actionListener="#{funcionarioAction.salvarFuncionario}"/>
                            <p:message for="salvar" />  
              
            </p:panel>  
        </p:tab>  
          
 </p:wizard>
	
	
	
	
	
	
	
	
	
	
	
		
		
		</p:panel>
	
	</h:form>

	</h:body>
</html>